<%@page import="javassist.bytecode.stackmap.BasicBlock.Catch"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'xianjin.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
 
  <body>
   <% try { %>
   
    <form action="cashierDesk!xianJin.do" method="post">

<div class="dialog open">
    <div class="dialog-head">
      <span class="close rotate-hover"></span>
      <strong>正在使用现金支付(<span id="dingdanhao">${orderSn }</span>)</strong>
      <input type="hidden" name="orderSn" value="${orderSn }" />
      <input type="hidden" name="memberId" value="${memberId }" />
      
    </div>
    <div class="dialog-body line">
        <div class="x12 over-auto " style="height: 230px;">
            <div class="x10">
               <!--  <input type="hidden" name="pdata[pay_id]" value="261386"> -->

                <div class="x12 form-group">
                    <div class="x3 text-right padding-right height-big cashier-pos-pay-t">
                        <label><strong>应收金额</strong></label>
                    </div>
                    <div class="x8 padding-large-right cashier-pos-pay-c">
                        <div class="input-group">
                            <input class="input text-large" type="text" name="yingShou" value="${moneyNum }" id="pay-cash-df" readonly="true">
                            <span class="addon">元</span>
                        </div>
                    </div>
                </div>
               <!--  <div class="x12 form-group">
                    <div class="x3 text-right padding-right height-big cashier-pos-pay-t">
                        <label><strong>其它方式已收</strong></label>
                    </div>
                    <div class="x8 padding-large-right cashier-pos-pay-c">
                        <div class="input-group">
                            <input class="input text-large" type="text" name="" value="0.00" id="pay-cash-yf" readonly="true">
                            <span class="addon">元</span>
                        </div>
                    </div>
                </div> -->
                <div class="x12 form-group check-success">
                    <div class="x3 text-right padding-right height-big cashier-pos-pay-t">
                        <label><span class="text-dot">*</span><strong>实收金额</strong></label>
                    </div>
                    <div class="x8 padding-large-right cashier-pos-pay-c">
                        <div class="input-group">
                            <input class="input" name="" id="pay-money-ss" type="text" placeholder="如:100" value="" data-validate="required:必填,plusdouble:请输入正确的金额"  onchange ="javascript:cashZl();">
                            <span class="addon">元</span>
                           <%--  <input class="input" id="pay-money-cash" type="hidden" name="pdata[money]" value="" data-validate="required:必填,plusdouble:请输入正确的金额,compare#<=31.00:数值须小于等于31.00"> --%>
                        </div>
                    </div>
                </div>
                <div class="x12 form-group">
                    <div class="x3 text-right padding-right height-big cashier-pos-pay-t">
                        <label><strong>找零</strong></label>
                    </div>
                    <div class="x8 padding-large-right cashier-pos-pay-c">
                        <div class="input-group">
                            <input class="input text-large" type="text" name="" value="0" id="pay-cash-zl" readonly="true">
                            <span class="addon">元</span>
                        </div>
                    </div>
                </div>
                <s:if test="#memberStatus!=0">
                <div class="x12 form-group ">
                    <div class="x3 text-right padding-right height-big cashier-pos-pay-t">
                        <label><strong>赠送积分</strong></label>
                    </div>
                    <div class="x8 padding-large-right cashier-pos-pay-c">
                        <div class="input-group">
                            <input class="input text-large" type="text" name="integral" value="${integral }" id="pay-cash-zl" readonly="true">
                            <span class="addon">分</span>
                        </div>
                    </div>
                </div>
                </s:if>
            </div>
        </div>
    </div>
    <div class="dialog-foot">
      <button class="button dialog-close" type="button">关闭</button>
      <button id="queren" type="submit" class="button bg-green"> 确认 </button>
    </div>
  </div>
</form>
<script type="text/javascript">
//支付宝支付推送
           /*  var cpuhao=navigator.userAgent;
            if(cpuhao.indexOf('GangHengKeJi')>=0){
                var weixin='<div class="x12  padding-big"><div class="x12 text-left text-black"><h1>请使用现金支付...</h1></div><div class="x12 text-left margin-top">订单号：'+$('#dingdanhao').text()+'</div></div><div class="x12 padding-big-top border-top border-big"><h1 class="text-red">支付金额：'+$('#pay-cash-df').val()+'</h1></div>';
                JS_FK._cr(weixin,'tuisongleirong4');
            } */
    $(function(){
    	$("#queren").attr({"disabled":"disabled"});
    });    
        
    function cashZl(){
    
    	var yingShou = $('#pay-cash-df').val();
    	var shiShou = $('#pay-money-ss').val();
         if(isNaN(Number(shiShou))==true){
             $.Showmsg("请输入数字！");
             return ;
        }
       
          if(Number(shiShou)<Number(yingShou)){
          
          $("#queren").attr({"disabled":"disabled"});
       		 $.Showmsg("输入金额不能小于应收金额，请重新输入！");
			 /* setTimeout(function() {
                            $.Hidemsg();
    				    }, 3500);  */
    	}else{
    		$("#queren").removeAttr("disabled");
    	}
        var zl = $('#pay-money-ss').val()- $('#pay-cash-df').val();
        $('#pay-cash-zl').val(zl.toFixed(2));
    }
    $(function(){
        $('#pay-money-ss').focus();
    });
</script>
  <% }catch(Exception e) {
			e.printStackTrace();
		} %>
  </body>

</html>
